﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Manage_ProductTypeAdd : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        FrontName.Attributes.Add("OnClick","javascript:SelectProductSort()");
    }

    protected void BtnAdd_Click(object sender, EventArgs e)
    {
        HZ.MBSM.DBUtility.Db db = new HZ.MBSM.DBUtility.Db(false);
        Grove.ORM.ObjectOperator oo = db.GetObjectOperator();
        HZ.MBSM.Model.product_sort product_sort = new HZ.MBSM.Model.product_sort();

        product_sort.SortName = SortName.Text;
        product_sort.FrontSortId = Convert.ToInt32(FrontSortId.Value); 

        oo.Insert(product_sort);
        oo.Dispose();
        db.Close();
    }
}
